.class Lrexsee/core/browser/RexseeUrl$29;
.super Lrexsee/core/browser/clazz/UrlListener;
.source "RexseeUrl.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/core/browser/RexseeUrl;-><init>(Lrexsee/core/browser/Browser;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/core/browser/RexseeUrl;


# direct methods
.method constructor <init>(Lrexsee/core/browser/RexseeUrl;Ljava/lang/String;)V
    .locals 0
    .param p2, "$anonymous0"    # Ljava/lang/String;

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/core/browser/RexseeUrl$29;->this$0:Lrexsee/core/browser/RexseeUrl;

    .line 695
    invoke-direct {p0, p2}, Lrexsee/core/browser/clazz/UrlListener;-><init>(Ljava/lang/String;)V

    return-void
.end method


# virtual methods
.method public run(Landroid/content/Context;Lrexsee/core/browser/Browser;Ljava/lang/String;)V
    .locals 10
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "browser"    # Lrexsee/core/browser/Browser;
    .param p3, "url"    # Ljava/lang/String;

    .prologue
    .line 698
    iget-object v7, p0, Lrexsee/core/browser/RexseeUrl$29;->this$0:Lrexsee/core/browser/RexseeUrl;

    # getter for: Lrexsee/core/browser/RexseeUrl;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v7}, Lrexsee/core/browser/RexseeUrl;->access$3(Lrexsee/core/browser/RexseeUrl;)Lrexsee/core/browser/Browser;

    move-result-object v7

    iget-object v7, v7, Lrexsee/core/browser/Browser;->pageBeforeStartListeners:Lrexsee/core/browser/clazz/PageBeforeStartListeners;

    iget-object v8, p0, Lrexsee/core/browser/RexseeUrl$29;->this$0:Lrexsee/core/browser/RexseeUrl;

    # getter for: Lrexsee/core/browser/RexseeUrl;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v8}, Lrexsee/core/browser/RexseeUrl;->access$3(Lrexsee/core/browser/RexseeUrl;)Lrexsee/core/browser/Browser;

    move-result-object v8

    invoke-virtual {v7, v8, p3}, Lrexsee/core/browser/clazz/PageBeforeStartListeners;->run(Lrexsee/core/browser/Browser;Ljava/lang/String;)V

    .line 699
    iget-object v7, p2, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    invoke-virtual {v7}, Lrexsee/core/application/RexseeApplication;->getDeveloperHome()Ljava/lang/String;

    move-result-object v0

    .line 701
    .local v0, "home":Ljava/lang/String;
    new-instance v7, Ljava/lang/StringBuilder;

    iget-object v8, p2, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v8, v8, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v8, v8, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v8}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v8, ":home_setup"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v0, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_1

    .line 702
    const-string v0, "http://"

    .line 703
    const-string v1, "http://"

    .line 704
    .local v1, "host":Ljava/lang/String;
    const-string v4, ""

    .line 705
    .local v4, "port":Ljava/lang/String;
    const-string v3, ""

    .line 715
    .local v3, "path":Ljava/lang/String;
    :cond_0
    :goto_0
    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "<HTML><HEAD><TITLE>"

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v8, p2, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v8, v8, Lrexsee/core/application/RexseeApplication;->label:Ljava/lang/String;

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "</TITLE></HEAD><BODY style=\'background-color:black;\'>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 716
    const-string v8, "<table width=100% height=100%><tr><td valign=middle style=\'padding:5px;font-size:16px;line-height:150%;color:white;\'>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 717
    const-string v8, "<center><div style=\'margin-bottom:20px;font-size:24px;\'>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    iget-object v8, p2, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v8, v8, Lrexsee/core/application/RexseeApplication;->label:Ljava/lang/String;

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "</div></center>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 718
    const-string v8, "<div style=\'margin-bottom:20px;\'>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    sget-object v8, Lrexsee/core/lang/RexseeLanguage;->MESSAGE_HOME_SETUP:Ljava/lang/String;

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "</div>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 719
    const-string v8, "<table style=\'font-size:16px;color:white;\'>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 720
    const-string v8, "<tr><td nowrap>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    sget-object v8, Lrexsee/core/lang/RexseeLanguage;->PREFIX_HOMEPAGE:Ljava/lang/String;

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "</td><td><input id=homeinput name=homeinput type=text style=\'width:200px;\' value=\'"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "\'></td><tr>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 721
    const-string v8, "<tr><td colspan=2><button style=\'margin-top:10px;border:1px solid white;background-color:#444444;color:white;padding:5 20 5 20;\' onclick=\"var home=document.getElementById(\'homeinput\').value;"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    iget-object v8, p2, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    invoke-virtual {v8}, Lrexsee/core/application/RexseeApplication;->getInterfaceName()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, ".setDeveloperHome(home);alert(\'"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    sget-object v8, Lrexsee/core/lang/RexseeLanguage;->MESSAGE_RESTART:Ljava/lang/String;

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "\');"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    iget-object v8, p2, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    invoke-virtual {v8}, Lrexsee/core/application/RexseeApplication;->getInterfaceName()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, ".restart();\">"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    sget-object v8, Lrexsee/core/lang/RexseeLanguage;->ACTION_SUBMIT:Ljava/lang/String;

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "</button></td><tr>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 722
    const-string v8, "<tr><td nowrap>URL/IP: </td><td><input id=urlinput name=homeinput type=text style=\'width:200px;margin-bottom:3px;margin-top:15px;\' value=\'"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "\'></td><tr>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 723
    const-string v8, "<tr><td nowrap>Port: </td><td><input id=portinput name=homeinput type=text style=\'width:200px;margin-bottom:3px;\' value=\'"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "\'></td></tr>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 724
    const-string v8, "<tr><td nowrap>Path: </td><td><input id=pathinput name=homeinput type=text style=\'width:200px;\' value=\'"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "\'></td></tr>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 725
    const-string v8, "<tr><td colspan=2><button style=\'margin-top:10px;border:1px solid white;background-color:#444444;color:white;padding:5 20 5 20;\' onclick=\"var port=(document.getElementById(\'portinput\').value==\'\')?\'\':\':\'+document.getElementById(\'portinput\').value; var home=document.getElementById(\'urlinput\').value+port+\'/\'+document.getElementById(\'pathinput\').value;"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    iget-object v8, p2, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    invoke-virtual {v8}, Lrexsee/core/application/RexseeApplication;->getInterfaceName()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, ".setDeveloperHome(home);alert(\'"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    sget-object v8, Lrexsee/core/lang/RexseeLanguage;->MESSAGE_RESTART:Ljava/lang/String;

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "\');"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    iget-object v8, p2, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    invoke-virtual {v8}, Lrexsee/core/application/RexseeApplication;->getInterfaceName()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, ".restart();\">"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    sget-object v8, Lrexsee/core/lang/RexseeLanguage;->ACTION_SUBMIT:Ljava/lang/String;

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "</button></td></tr>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 726
    const-string v8, "</table>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 727
    const-string v8, "</td></tr></table>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 728
    const-string v8, "</BODY></HTML>"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    .line 715
    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 729
    .local v2, "html":Ljava/lang/String;
    iget-object v7, p2, Lrexsee/core/browser/Browser;->function:Lrexsee/core/browser/RexseeBrowser;

    invoke-virtual {v7, v2}, Lrexsee/core/browser/RexseeBrowser;->loadHTMLWithoutHistory(Ljava/lang/String;)V

    .line 730
    return-void

    .line 707
    .end local v1    # "host":Ljava/lang/String;
    .end local v2    # "html":Ljava/lang/String;
    .end local v3    # "path":Ljava/lang/String;
    .end local v4    # "port":Ljava/lang/String;
    :cond_1
    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v6

    .line 708
    .local v6, "uri":Landroid/net/Uri;
    new-instance v7, Ljava/lang/StringBuilder;

    invoke-virtual {v6}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v8, "://"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v6}, Landroid/net/Uri;->getHost()Ljava/lang/String;

    move-result-object v8

    if-nez v8, :cond_3

    const-string v8, ""

    :goto_1
    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 709
    .restart local v1    # "host":Ljava/lang/String;
    invoke-virtual {v6}, Landroid/net/Uri;->getPort()I

    move-result v7

    if-gez v7, :cond_4

    const-string v7, ""

    move-object v4, v7

    .line 710
    .restart local v4    # "port":Ljava/lang/String;
    :goto_2
    new-instance v7, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v8, ""

    invoke-virtual {v4, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v8

    if-eqz v8, :cond_5

    const-string v8, ""

    :goto_3
    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    .line 711
    .local v5, "tmp":Ljava/lang/String;
    invoke-virtual {v5}, Ljava/lang/String;->length()I

    move-result v7

    invoke-virtual {v0, v7}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v3

    .line 712
    .restart local v3    # "path":Ljava/lang/String;
    const-string v7, "//"

    invoke-virtual {v3, v7}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v7

    if-eqz v7, :cond_2

    const/4 v7, 0x2

    invoke-virtual {v3, v7}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v3

    .line 713
    :cond_2
    const-string v7, "/"

    invoke-virtual {v3, v7}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v7

    if-eqz v7, :cond_0

    const/4 v7, 0x1

    invoke-virtual {v3, v7}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v3

    goto/16 :goto_0

    .line 708
    .end local v1    # "host":Ljava/lang/String;
    .end local v3    # "path":Ljava/lang/String;
    .end local v4    # "port":Ljava/lang/String;
    .end local v5    # "tmp":Ljava/lang/String;
    :cond_3
    invoke-virtual {v6}, Landroid/net/Uri;->getHost()Ljava/lang/String;

    move-result-object v8

    goto :goto_1

    .line 709
    .restart local v1    # "host":Ljava/lang/String;
    :cond_4
    invoke-virtual {v6}, Landroid/net/Uri;->getPort()I

    move-result v7

    invoke-static {v7}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v7

    move-object v4, v7

    goto :goto_2

    .line 710
    .restart local v4    # "port":Ljava/lang/String;
    :cond_5
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, ":"

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    goto :goto_3
.end method

.method public shouldAddToHistory(Landroid/content/Context;Lrexsee/core/browser/Browser;Ljava/lang/String;)Z
    .locals 1
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "browser"    # Lrexsee/core/browser/Browser;
    .param p3, "url"    # Ljava/lang/String;

    .prologue
    .line 733
    const/4 v0, 0x1

    return v0
.end method
